Logging-while-drilling encoder

ABSTRACT

In a logging-while-drilling system motor speed is changed in order to change the phase of an acoustic signal between two phase states. In carrying out a change in phase state, a step voltage is initially applied to a motor control circuit. Added to the step voltage is a linearly increasing voltage. The amount of phase shift in the acoustic signal is detected, and upon the occurrence of a predetermined phase shift the voltage applied to the motor control circuit is reduced to a lesser value. The application of the voltage of lesser value is continued for a predetermined time at which the acoustic signal will have substantially attained the other phase state. The rotary valve driven by the motor imparts a high degree of phase coherence to the acoustic signal which it generates. Rotation of the motor is phase locked to a highly stable clock in near optimal manner by sampling the phase error between the clock and the motor angular position reference every half period of the acoustic signal.

United States Patent 1191 Sexton et al. June 25, 1974LUGGING-WHILEDRILLING ENCODER Primary Examiner-T. H. Tubbesing AssistantExaminer-N. Moskowitz [75] lnventors: James H. Sexton Duncanville;

Bnbbie Patton: Dallas; John W. Attorney, Agent, or Firm-A. L. Gabonault;W1ll1am .1. Harrell, Duncanville, @111 of Tex. scherbac" [73] Assignee:Mobil Oil Corporation, New York, [57] ABSCT NY. in alogging-while-drilling system motor speed is Flled? 12, 1973 changed inorder to change the phase of an acoustic [21] APPL 340,137 signalbetween two phase states. In carrying out a change in phase state, astep voltage is initially applied to a motor control circuit. Added tothe step voltage is (1m 340/18 8 NC, 340/18 a linearly increasingvoltage. The amount of phase 175/50, 324/83 FE, 318/314 shift in theacoustic signal is detected, and upon the [5 ccurrence of apredetermined phase hift the oltage Field of Search 340/ 18 P, 18 FM, 18LD, applied to the motor control circuit is reduced to a 340/1 166/ 3;175/40, 50, lesser value. The application of the voltage of lesser324/33 314, 333-335, 227 value is continued for a predetermined time atwhich the acoustic signal will have substantially attained theReferences Clied other phase state. The rotary valve driven by theUNITED STATES PATENTS motor imparts a high degree of phase coherence tothe 2,700,131 1/1955 Otis etal 340/18 FM acoustic Signal Which itgeherfltes- Rotation the 3,015,801 1/1962 Kalbfell .1 340/18 FM motor 18Phase locked to a hlghly Stable clock near 3,309,656 3/1967 Godbey340/18 LD optimal manner by sampling the phase error between 3,553,5551/1971 Morris et a1. 318/314 the clock and the motor angular positionreference 3,668,492 6/1972 Kowishi et a1. 318/314 every half period ofthe acoustic signal,

15 Claims, 8 Drawing Figures ROTARY VALVE TRANSMITTER #10 Q 22 E0 m 11 1SUMMING- "3622? c'fiiffit gggggggg I I 5 16 18 I2 I i 1 ates? a sa e I I34 a2 l 1 Tat/111 L L. s a a M M l 24 I K 26 2s A D PARALLEL 2MULTIPLE), CONVERTER iR 'Q' DN COUNTER PATENTEU 3,820,053

. SHEE" 1 UF 6 ROTARY VALVE TRANSMITTER '-IO II INDUCTION MOTORSWITCHING MOTOR CONTROL AMPLIFIER 1 I5 I6 I8 I2 I PULSE 2f PHASE ERRoR2f I TACHOMETER GENERATOR DETECTOR CLOCK TRANSITION I PHASE SHIFT gfiyglf I DETECTOR l A "ax- RIE D 2 MULTIPLEX CONVERTER coNvERTER couNTER DNpmmamunzs I974 I 3.820.083

SHEET 3 BF 6 FROM FIG. 2

r P FILTER s PULSE FILTER a HOLD q INTEGRATOR COMPARATOR GENERATOR 90(I) (X) DECELERATION sTART FLIP-FLOP (w) 96 92 7 4 (a TRANsI-TIoN (bb)DECELERATION STOP TIME coNTRoL GATE PULSE GEN. PULSE GEN. 70 32TRANSITION M TRANsITIoN (x) I U) sTART CONTROL 5 FROM PULSE GEN. FLIPFLOP I PARALLEL TO SERIAL (x) coNvERTER 72 To 60 FIG.2

ARK

W30 SUMMING MOTOR DR IVE AMPLIFIER FRoM FIG. 2

PAINTED-11111251974 3.820.063 sum 5 OF 6 FIG. 5

TRIP POINT 0 (r) J 60 (D) W (x) l L (bb) i LOGGING-WHILE-IDRILLIINGENCODER BACKGROUND OF THE INVENTION This invention relates to thelogging of wells during drilling and more particularly to the telemetryof data relating to downhole conditions by means of an acoustic signaltransmitted through drilling liquid within a well while concomitantlydrilling the well.

Various telemetering methods have been suggested for use inlogging-while-drilling procedures. Examples are shown in US. Pat. Nos.3,015,801 and 3,205,477 to Kalbfell. In the Kalbfell systems, anacoustic energy signal is imparted to the drill pipe and the signal isfrequency modulated in accordance with a sensed down hole condition.Frequency shift keying is employed to transmit the acquired data in adigital mode. Yet other telemetering procedures proposed for use inloggingwhile-drilling systems employ the drilling liquid within the wellas the transmission medium. One such technique is described in US. Pat.No. 3,309,656 to Godbey. In the Godbey procedure, an acoustic wavesignal is generated in the drilling liquid as it is circulated throughthe well. This signal is modulated in order to transmit the desiredinformation to the surface of the well. At the surface the acoustic wavesignal is detected and demodulated in order to provide the desiredreadout information.

In US. Pat. No. 3,789,355 to Bobby J. Patton, there is disclosed atechnique utilizing a modulator similar to that disclosed in the Godbeypatent for the purpose of encoding pressure signals in a phase shiftkeying mode. In the foregoing an electric motor is utilized to controlthe operation of the modulator.

SUMMARY OF THE INVENTION In accordance with the present invention theoperating characteristics of an electrical motor are controlled to drivea mud stream interrupter or modulator at a predetermined speed.

The invention relates to a method of and apparatus for imparting a highdegree of phase coherence to an acoustic signal generated by a rotaryvalve driven by the motor. The phase of the acoustic signal is changedby 180 thereby encoding a binary bit into the signal. In carrying out achange in phase, the speed of a motor is changed by initially applying astep voltage to a voltage controlled motor speed control circuit. Addedto the step voltage is a linearly increasing voltage.

The step and ramp voltage cause the motor to accelerate thus changingthe phase of the acoustic signal. The amount of phase shift in theacoustic signal is measured. Upon the occurrence of a predeterminedphase shift, the voltage applied to the voltage controlled motor speedcontrol circuit is immediately reduced to a lesser value. Theapplication of the voltage of lesser value is continued for apredetermined time at which the acoustic signal will have substantiallyattained a 180 phase shift. At the end of this predetermined time, thespeed of the motor is phase-locked to the local clock.

The frequency and phase of the acoustic signal is determined by therotation of an induction motor which drives the rotary valve through apositive, nonslip drive train. The rotation of the motor is phase-lockedto a highly stable clock. Phase locking is accomplished in a nearoptimal manner by sampling the phase error between the clock and a motorangular position reference every half period of the acoustic signal andimmediately correcting the frequency of the motor supply in proportionto the phase error.

DESCRIPTION OF THE DRAWINGS FIG. ll illustrates in block schematic forma transmitting system embodying the present invention utilized incontrolling the operation of a rotary valve for the generation of anacoustic signal within a liquid path in a well;

FIG. 2 illustrates in block schematic form further details of the pulsegenerator and the phase error detector of FIG. ll;

FIG. 3 illustrates in block schematic form further details of thetransmitter control and transition phase shift detector of FIG. 1;

FIGS. 4 and 41A depict the waveforms associated with the operation ofthe equipment illustrated in FIG. 2;

FIG. 5 depicts waveforms associated with the opera tion of the equipmentof FIG. 3; and

FIG. 6 illustrates in circuit schematic form details of thesample-and-hold and amplifier and ramp generator of FIG. 2.

DESCRIPTION OF THE PREFERRED EMBODIMENT The OverallLogging-While-Drilling System, FIG. 1

In accordance with the preferred embodiments of the invention asdescirbed in more detail hereinafter, an acoustic signal is transmittedthrough the drilling liquid employed in normal drilling operations. Asthe well is drilled, at least one downhole condition within the well issensed and a signal, in most cases analog, is generated which isrepresentative of the sensed condition. An analog signal is converted toa serial digital signal. The acoustic signal generated within thedrilling liquid is modulated in response to the digital signal bycorrelating the phase of the acoustic signal during sequential timeperiods corresponding to the digit intervals of the digital signal witha plurality of phase conditions representative of the respective digitvalues of the digital signal. The acoustic signal is received at anuphole station and demodulated as described in the aforesaid Pattonapplication in order to produce appropriate readout functionscorresponding with the respective phase conditions. These readoutfunctions then may be applied to appropriate utilization means, such asrecording and/or data processing systems such as computers, from whichdesired information may be derived.

Turning now to FIG. ll, there is disclosed a system for controlling theoperation of a rotary valve transmitter driven by induction motor 11 tocontinuously interrupt the flow of drilling liquid within the drill pipein order to produce an acoustic signal of substantially fixed frequencyand phase.

Phase coherency is maintainted in the acoustic signal by phase-lockingthe rotation of induction motor 111 to a stable clock 12. Phase-lock isaccomplished by a control loop comprised of clock 12, a tachometer 15,pulse generator 16, phase error detector 118, summing amplifier 20, andvoltage controlled motor speed control circuit 22. The tachometer 15together with pulse generator to produce pulses at a rate which is twicethe sonic frequency produced by the rotary transmitter 10. The outputfrom the clock 12 is a series of pulses whose rate is twice the desiredoutput frequency from the rotary transmitter 10. Pulses from the pulsegenerator 16 and from the clock 12 are applied to the phase errordetector 18 which measures the relative time occurrences of thepulses.Should these pulses from the pulse generator 16 have a time occurrenceor phase relationship other than definitive of the desired sonic phase,an error signal is applied by way of the summing-switching amplifier 20to the motor speed control 22 to change the speed of the induction motor11, thus, to bring the system into what is referred to as a phase-lockmode.

Sensible information concerning measured downhole conditions can betransmitted by the drilling liquid to the surface by changing the phaseof the signal generated by the rotary transmitter employing an encodingor telemetry mode known as phase-shift keying.

In employing such a mode, data, usually in analog format, is receivedfrom a plurality of downhole detectors, D,, D D U and applied by way ofa multiplexer 24 to an A/D converter 26. The output of the A/D converter26 is applied to parallel to serial converter 28 which arranges the datain a serial binary format.

As more fully explained in the aforesaid Patton application, themultiplexer 24, the A/D converter 26, and the encoder 28 aresynchronized and otherwise under control of the clock 12 and a counter30, the latter being essentially a divider which establishes outputshaving different pulse rates to enable proper operation of the aforesaidcomponents. One such train of pulses is applied to the converter 28 toestablish data bit intervals, or, otherwise stated, intervals duringwhich a data bit is to occur. The data bits are serially applied to atransmitter control 32. The transmitter control 32 is effective by wayof the switching amplifier to disable the phase-lock control and toapply a programmed function to the motor speed control 22 to change thespeed of the motor. The change in speed may be either by way ofdeceleration or acceleration. In the embodiment being described, wechoose to accelerate the speed of the motor with the programmedfunction.

Upon the occurrence of a predetermined amount of phase shift in theacoustic signal generated by the rotary transmitter 10, transitionphase-shift detector 34 generates a control pulse applied to thetransmitter control 32. This terminates the application of the firstprogrammed function and effects the application of a second programmedfunction which preferably is of a fixed time duration to again changethe speed of the motor to return it to the predetermined value but with180 shift in the phase of the acoustic signal. If the first program isutilized to accelerate the motor, then the second program obviously willbe utilized to decelerate the motor. And of course the converse is true.

In the system described, the mode of telemetry is phase shift keyingnonreturn to zero. In such a mode, the phase of the signal produced bythe rotary transmitter will be changed only upon the occurrence of a 1bit; therefore, the transmitter control 32 will initiate theabove-described operation only upon the occurrence of a 1 bit from theconverter 28. Nonreturn to zero may also be implemented in response tothe occurrence only of a 0 bit. However, it is moreconventional toemploy the 1" bit for effecting the phase change.

The Pulse Generator 16 and The Phase Error Detector 18, FIG. 2

Referring now to FIG. 2 there is shown further details concerning thepulse gnerator 16 and the phase error detector 18. The pulse generator16 receives the output of tachometer 15, a sine wave shown in FIG. 4 asthe wave train a, and treats it to produce at the output of pulsegenerator 40 two series of complementary pulses e and f whose rate isequal to twice the frequency of the sonic signal produced by the rotarytransmitter 10. The pulses e and f are produced in the following manner.The output a from the tachometer 15 is applied to a full-wave rectifier42 whose output, the wave train b, is negative going. The type offull-wave rectifier utilized is commonly referred to as an absoluterectifier which will utilize an operational amplifier such that therectification is essentially absent of distortion. The wave train b isconverted by way of pulse generator 44 to a series of pulses 0 whoserepetition rate is twice the frequency of the tachometer output. Thepulse generator utilized in the practice of the present invention can bedescribed as a comparator or level detector which produces an outputonly when the input is between zero and some predetermined negativevalue of the wave train b. In the system employed, the tachometer outputhad a frequency of exactly 15 times the frequency of the sonic signalgenerated by the rotary transmitter 10. Accordingly, in order to producethe desired pulse repetition rate for the pulses e, that is, twice theactual sonic frequency, it is necessary to divide, as by utilizing thedivider 46, the pulses c by a quotient of 15 to produce a train ofsquare waves d. The pulse generator 40 responds to the trailing edge ofthe square wave d to produce the pulses e.

Using a pulse generator and a clock which produce pulses at twice thefrequency of the acoustic signal has many advantages. The phase lock isnecessarily automatically in one of two phase states. A phase statechange is implemented by adding one tachometer pulse to produce a 180phase change. Also a phase state change need only be targeted to 180 ithen phase-lock is automatic at As a practical matter, it may bepossible to design a tachometer whose output frequency will be twice thesonic frequency of the rotary transmitter. In such an event, it isobvious that there would be no need for the divider 46 or for the pulsegenerator 44 and that other means could be devised and utilized inconjunction with the pulse generator 40 to produce the desired pulsetrain e. The pulse generator 40 responds to pulses d to produce a secondtrain of pulses f having the same repetition rate as the pulses e.

The pulses e, f, together with the pulses g from the clock 12, areutilized by phase error detector 18 to maintain the phase of theacoustic signal, generated by the transmitter 10, substantially constantwith respect to the pulses g. If any two pulses e, f occur at a point intime which is precisely at the midpoint between the occurrence of twoconsecutive pulses g, then the pulses e, f will be exactly 180 out ofphase with the pulses g. For this condition the error signal e appliedto the motor speed control 22 (FIG. 3) by summing switching amplifier 20will be zero. For any other phase difference d besides 180, an errorsignal will be generated proportional to 180 d). A correction frequencyproportional to the error signal described above is applied by motorspeed control 22 to induction motor 11 to change its speed in adirection (increase or decrease) which reduces the phase error.

Phase error detector 11% consists of set-reset pulse generator 5%),flip-flop 52, integrator 54, sample and hold 56, and amplifier andfunction generator 60. The clock pulses g are applied to set-reset pulsegenerator 50 which produces two trains of complementary pulses j and k.At the onset of pulse j, flip-flop 52 is set to a logic 1 (10 volts).For the duration of pulse k, integrator 541 is reset. Pulse 2 producedby pulse generator dill resets flip-flop 52 to a logic (zero volts). Inthis manner pulses j and e determine the time flip-flop 52 remains inthe logic i state. The output of flipflop 52, h, is a constant amplitudepulse whose width is directly proportionfl to the phase differencebetween pulses j and e. Pulses j have a frequency of exactly twice thedesired acoustic signal frequency. Pulses e have a frequency exactlytwice the actual acoustic signal frequency. The output of flip-flop 52,h, is applied to integrator 54l which is reset by pulse k and beginsintegrating signal h at the termination of pulse k. At the onset ofpulse k, h is set to 10 volts by pulse j which is coincident with pulsek. The output of integrator 54 is a negative-going ramp, m, until 11 isreset to zero by pulse 2. Upon the occurrence of pulse e, the integratoroutput, m, remains at the attained negative voltage since its input hasbeen reset to zero.

The value of the negative voltage at the integrator output is directlyproportional to the time h remained at 10 volts and therefore isproportional to the phase difference between j and e. Pulse f iscoincident with pulse 2 and is applied to sample-and-hold 56. For theduration of f, sample-and-hold 56 samples the sum of m and a referencevoltage provided as shown by a source of do (illustrated as a battery).The reference voltage is selected to be equal and opposite in sign tothe integrator output for the condition where pulses j and e are exactly180 out of phase. Sample-and-hold 56 inverts the sign of the sampled sumof its two inputs producing error signal n. Signal n will be zero whenpulses j and e are 180 out of phase; however, for any departure fromthis desired phase relationship, n will be a positive or negativevoltage proportional to the phase error. The output of sample-and-hold56, n, is applied to amplifier and ramp generator 6th. in the phase-lockmode, hill is a unity gain inverting amplifier whose output is denotedby e 0 Signal e #3 in the phase-lock mode, is applied to summingswitching amplifier 64 (FIG. 3) which inverts e qt producing output 0which is applied to motor speed control 22. In this manner phase errordetector 118 produces a bipolar error voltage e 1b which is effective inchanging the motor speed in such a manner as to substantially establishand maintain the desired phase relationship between pulses j and Notethat phase error voltage e d, is constant during the interval betweentwo consecutive pulses f producing a constant frequency signal which isapplied to the motor. Error voltage e a is updated every half cycle ofthe acoustic signal during the occurrence of pulse f. Sample-andholdcircuit 56 samples the phase error for the duration of f and upon thetermination of f holds the sampled value until the occurrence of thenext consecutive sample pulse f. Each updated sample of the phase erroris immediately (no filtering) effective in changing the frequency of themotor drive power.

High gain is incorporated into this control loop to provide rapid phaselock of the acoustic signal a few sample periods. The gain of the phaseerror detector 18 (volts/degree) can be adjusted by changing the RC timeconstant of integrator 54 or by changing the gain of sample and hold 56.The proper gain depends on the gain of motor speed control 22(Hz/volts), characteristics of induction motor 1 1, and other systemproperties. The optimum gain is best determined empirically. SummingAmplifier 20, FIG. 3

By the means previously described, the phase of the acoustic signal ismaintained substantially constant when the system is in the phase-lockmode. Referring to FIG. 3, further details of the summing switchingamplifier 20 are shown. When the system is in the phaselock mode, themotor is under control of two functions. One of them is a constantvoltage designated as E,; which is applied by way of resistor 6:2 to theinput of summing amplifier ML The other is the phase error voltage :e dwhich is applied from the output of amplifier (FIG. 2) by way ofresistor and normally closed switch 66 also to the input of the summingamplifier. The sum of these two signals is inverted and positive signal,+5 ie 4 is applied. to motor speed control to maintain the phase-lockcondition. The motor speed control is effective in changing the speed ofthe induction motor 111 by changing the frequency which is applied tothe motor. The frequency applied to the motor is linearly related to thevoltage produced at the input to motor speed control 22 by summingamplifier 6d, increasing with increasing voltage and vice-versa. Thevoltage 13,, is selected to provide approximately the correct frequency.

Upon the occurrence of a data pulse, and in this instance a serialbinary 1 bit, the phase of the acoustic signal will be changed to asecond phase state by the initiation of the generation of a programmedfunction which will change the speed of the motor. Where a binary modeof transmission is being utilized, the second phase state will differfrom the first phase state by To change the phase state, the motor mayeither be accelerated or decelerated. With this understanding of theoptions available, the following description will concern itself withthe mode wherein the speed of the motor is first accelerated and thendecelerated to change the phase. in this operation, having acceleratedthe motor there will be generated thereafter and upon occurrence of apredetermined phase shift in the acoustic signal a control pulse whichwill be effective to initiate operations which will be effective todecelerate the motor and return it to the predetermined constant speedbut with the phase of the acoustic signal changed by 180. Thereafter anduntil the occurrence of another binary 1 bit, the motor will be undercontrol of the phase-lock loop.

Implementation of the 180 phase shift is accomplished in the followingway, described with reference to FIG. 3 which shows further details ofthe transmitter control 32 and transition phase shift detector 1% withassociated waveforms shown in FIG. 5. A binary I bit represented by thewaveform u is applied to a transition start pulse generator '70. Thisgenerator, which may be a monostable multivibrator, produces a pulse vinitiated by the trailing edge of the waveform u. The leading edge ofthe pulse v triggers a transition control flip-flop 72 which produces asquare wave x having a time duration in which the phase change or shiftis to occur in the acoustic signal. The onset of the square wave xinitiates several functions. One of them is immediately to disable thephase-lock loop as by disconnecting the circuits of block 60 and, in thespecific embodiment described, to convert the amplifier function ofblock 60 to a function generator. At the same time, the switch 66 isopened. The onset of the square wave x is also applied to a gate 74whose output y changes to a logic Upon the occurrence of this change iny to a logic 0, normally open switch 76 is closed. The output from theblock 60 (FIG. 2), now a function generator, is applied by way ofresistor 78 and switch 76 to the input of the summing amplifier 64 tobegin the acceleration of motor 11 by way of motor control 22.

The motor will continue to accelerate until a predetermined shift in thephase of the acoustic signal occurs. At this predetermined shift inphase, preferably at about 90 or greater, the control function appliedto the summing amplifier 64 will be changed so as to decelerate themotor and return it to its phase-locked speed and phase. Thedetermination of the attainment of the predetermined shift in phase atwhich time the character of the control function is changed isaccomplished in the following manner.

Transition Phase Shift Detector 34, FIG. 3

We have found that there is a relationship between the phase-lock speedof the tachometer l5 and the instantaneous speed of the tachometer whichcan be detected and is a direct measure of phase shift. Moreparticularly, it can be shown that a measure of phase shift can beobtained by comparing a voltage representative of the speed of thetachometer in the phase-lock mode with the integral of the differencebetween that voltage and a voltage representative of the instantaneousspeed of the tachometer. When the integral voltage together with thevoltage representative of phase-lock speed attain equality, (or somefraction thereof), a specific phase shift has been attained. The amountof phase shift required to produce the equality can be shown to bedetermined by the RC characteristics of the integrator being employed.Therefore, by establishing the amount of phase shift desired, it isnecessary only to establish the appropriate constant for the integrator.

In carrying out the foregoing in the system of the present invention thewaveform b from the output of the fullwave rectifier 42 is applied tothe input of a first filter 80. The amplitude of waveform b is linearlyproportional to the motor speed. This filter has a relatively short timeconstant and is provided primarily to remove ripple present in thewaveform b. The output of the filter waveform p representative of theinstantaneous speed of the tachometer, is applied to a filter-and-holdcircuit 82 and to one input of the differential integrator 84. Theintegrator 84 is normally disabled or in a reset mode. The filter 82 hasa long time constant T= RC 0.2 sec, ideally a time like 1 baud) orotherwise is a low-pass filter which essentially ignores rapidfluctuations that may occur at its input. Therefore its output q isessentially a constant value representative of the average speed ofthe'motor during the time filter and hold 82 functions as a filter. Aswill be seen below, filter and hold 82 functions as a filter only whilethe motor is in the phase-locked carrier mode; consequently, its outputis, at all times, representative of the phase-locked speed of the motor.

Upon the onset of the square wave x, the integrator 84 is enabled. Thefilter 82 is disconnected from the input waveform p and placed in a holdposition such that its output q will remain constant and will beunaffected by the expected change in the value of p occasioned by theacceleration to take place in the speed of the tachometer.

The output from the integrator 84 is the integral of the differencebetween the voltages q and p. The integrator output waveform r is shownin FIG. 5 to rise to a value identified as the trip point. At thismoment the value of the voltage r has equaled the value of the voltage qand the output of comparator 86, s, changes from a logic l to a logic 0.This triggers pulse generator 88 producing a control pulse r. Theoccurrence of the pulse t', is always at the time when the measuredphase shift is the predetermined desired value. This measured phaseshift is independent of changes in the operating characteristics of thetachometer due to wear, pressure, temperature, or any other condition.This is by reason of the fact that any changes in voltage output fromthe tachometer will apply equally to both voltages being compared forthe establishment of the trip point. Transmitter Control 32, FIG. 3

At the time occurrence of the trip point, the function applied to thesumming amplifier is changed to begin decleration of the motor. This isaccomplished by application of the pulse t to a deceleration startflip-flop 90 whose output aa changes from a logic l to a logic 0. Output011 is applied to the input of the gate 74. The gate 74 is a NAND gate.With a logic zero, waveform aa at one input and a logic 1, input x, atthe other input, its output immediately goes to a logic l The output,square wave y opens the switch 76 and disconnects the input of thesumming amplifier 64 from the function generator 60 (FIG. 2).

The onset of the negative-going square wave aa is applied to adecleration time control pulse generator 92 whose output, anegative-going square wave z, is applied to switch 94 to initiate thesecond part of the programmed function necessary to bring the acousticsignal back into phase lock at a phase shift of The pulse generator 92is a monostable multivibrator having a predetermined astable time. Italso produces a second pulse bb which is applied to a transition stoppulse generator 96. At the end of the astable period of the pulsegenerator 92, the square wave bb changes to a logic 0 and the transitionstop pulse generator 96 responds to produce the pulse w. The pulse w iseffective to change x back to a logic 0 and aa to a logic l whereuponthe gate 74 will cause its output to remain at a logic l, maintainingthe switch 76 open. The pulse w, in carrying out these functions, isapplied to the deceleration start flip-flop 90 to change its output aafrom a logic 0 to a logic l Pulse w is also applied to the transitioncontrol flip-flop 72 to effect the change in the logic state of thewaveform x. With the return of the waveform x to a logic 0, the switch66 is closed and the circuits in block 60 are reconnected to the outputof the sample-and-hold block 56 (FIG. 2). Additionally the function ofthe block 60 is returned to that of an amplifier. In addition theintegrator 84 is reset and the filter-and-hold circuit 82 returns to asimple filter status.

While the present invention is useful with many control functions foraccelerating or decelerating the motor 11 to change the phase of thesonic signal, we have found a function which is particularly useful ineffecting a 180 phase change in the sonic signal in a minimum of time.The characteristic of this function is represented by the waveform 0. Itcomprises an initial step function followed by a linear ramp. The stepand ramp are chosen to increase the applied frequency in such a mannerthat slip between the applied frequency and motor speed is near optimumto give maximum acceleration. The ramp continues until the trip point isreached whereupon the voltage is immediately dropped to anotherpredetermined step value and held for a predetermined time period as isrepresented by the astable period of the deceleration time control pulsegenerator 92. The Generations of the Linear Ramp Function 0, FIG. 3

The generation of the function is accomplished in the following manner.Function 0 is the output of summing switching amplifier 20. Summingswitching amplifier 211 is basically an inverting adder with switchableinputs which can be weighted by proper selection of the feedbackresistor and input resistor ratios. Appropriate inputs are selected bymeans of FET analog switches 66, 941 and 76 which are controlled bytransmitter control 32. It will be recalled that at the beginning of thetransition period the switch '76 was closed. At this time voltage ofapproximately +2 volts at the output of operational amplifier 64 isderived by way of the voltage source, E and resistors 100 and 63. Thisrepresents the onset or the initial step portion of the waveform 0. Tothis is added the linearly rising ramp function generated by thecircuits of block 611. At the occurrence of the trip point, the switch76 is immediately opened and switch 94 closed whereupon the voltageapplied to the input of the summing amplifier immediately drops to a newvalue determined by the -E,, input and the values of resistors M12 and63. This voltage is maintained over the astable period of the pulsegenerator 92, at the end of which the control of the motor is returnedto the phase-lock loop wherein switches 76 and 9 1 are opened and switch66 closed. The variations in the value of the voltage 0 represents thepresence of an error voltage from the phase-lock loop and the rapidreturn to phase lock by the system. The Circuitry of Integrator 5dSample-and-I-Iold 56 and Function Generator 6%, FIG. 6

The circuit which performs the function of transforming the block 611(FIG. 2) from amplifier to ramp generator and back again is illustratedin FIG. 6. The circuit includes integrator 54, sample-and-hold circuit56, and the amplifier and ramp generator 60. The integrator 5 1 includesan operatonal amplifier 110. The waveform h is applied to its input. Theoutput m is applied by way of resistor 112 to a summing point 114 of thesample-and-hold circuit 56. A voltage derived by a voltage dividingnetwork comprised of resistors 116 and 118 is applied to the summingpoint by way of resistor 1211. This voltage is of opposite polarity fromthe output of the integrator and has a value equal to that which theintegrator should have if the clock pulses and the tach pulses areexactly 180 out of phase. With the switch 122 closed, the circuit 56 isin a sample mode and samples the difference in the voltages applied tothe summing point 114. With the switch 122 under control of the waveformf open, the circuit 56 is in a hold mode and its output, waveform n, isapplied to the circuit 611.

With operation in the phase-lock mode, the circuit 60 is an amplifier.At this time the waveform x is a logic O and is applied to the switches12d and 125 which are closed. Switch 126 is also closed by reason of thefact that the closed switch 125 connects its control point to ground.With the capacitor 129 being shorted by closed switch 124, it canimmediately be seen that the circuit is a unity-gain inverting amplifieroperating upon the input voltage n which is applied by way of re sistor130. Unity gain is achieved by having the feedback resistor 131 equal invalue to the resistor 134). While in this configuration, a voltage isbeing applied from the IS-volt source, by way of a resistor 132 which isvery much larger than the feedback resistor 131. Hence any input thatmight be applied by way of resistor 132 can be ignored because the gainof the amplifier is essentially zero due to the relation in the sizes ofthe resistors.

Upon the initiation of the transition interval, that is, the time atwhich we desire to change the phase of the sonic signal, the waveform xchanges from a logic 0 to a logic 1. Upon the occurrence of a logic 1,switch 124! as well as switch 125 are open. The opening of switch 125disconnects the control point 127 from ground and a negative voltage isapplied by way of re sistor 1341- to open the switch 1.26. Accordingly,the input of the circuit 60 is disconnected from the output of thesample-and-hold circuit 56. With the switch 124 open, the circuit 60 nowbecomes an integrator having applied to its input a voltage from the15-volt source by way of the resistor 132. Accordingly, there isproduced at the output of the circuit 66 a negative going ramp functionwhich is applied to summing switching amplifier 20 producing the rampportion of function 0 in FIG. 5.

At the end of the transistion interval the waveform it returns to alogic 0 and the function of the circuit 60 is returned to that of anamplifier.

Filter-andHold Circuit 82, FIG. '7

Details of the filter-and-hold block 552 are illustrated in FIG. 7.Circuit 82 includes an operational amplifier 136 having waveform papplied to its negative input by way of resistor 138 and normally closedswitch 140. The switch 140 is closed during the phase-lock mode byreason of having applied thereto the waveform x which is in a logic 0.With resistor M2 and capacitor 1414 in its feedback loop, theoperational amplifier represents a low-pass filter whose output is thewaveform q. I Jpon the initiatior gf the transition mgde, the waveform xchanges to a logic ifiiifiiFdpen 'wfiii 146. This immediatelydisconnects the input of the operational amplifier 136 from the waveformp, and with only the capacitor 1% in its feedback loop the operationalamplifier assumes the function of a hold circuit and maintains the lastvalue of waveform q at its output.

The various switches 122, 125, 124 and M6 referred to in the foregoingdescription are provided by FET P- Channel Transistors which are the2N3993 type. Switch 126 is a 2N4857 N-Channel FET.

What is claimed is:

1. In a logging-while-drilling system including a motor which drives anacoustic generator at a predetermined speed for imparting to well liquidan acoustic signal having phase states representative of data derivedfrom measured downhole conditions, a data encoder, the improvementcomprising:

means responsive to the occurrence of a data pulse for generating aprogrammed function applied to said motor to change the speed of themotor,

means for generating a control pulse upon the occurrence of apredetermined phase shift in the acoustic signal caused by a shift inmotor speed relative to said predetermined speed to terminate theapplication of said first programmed function, and

means responsive to said control pulse for generating a secondprogrammed function of fixed time duration applied to said motor toagain change the speed of the motor to return it to said predeterminedspeed but with a shift in the phase of the acoustic signal.

2. The system recited in claim 1 further comprising:

a motor control circuit including means for maintaining the speed ofsaid motor constant at said predetermined speed and in a constantpredetermined phase relation to local clock pulses.

3. The system recited in claim 2 wherein said motor control circuitincludes:

a tachometer producing tachometer pulses representing the speed ofrotation of said motor, and means for producing an error voltagerepresenting the difference in phase between said tachometer pulses andsaid local clock pulses.

4. The system recited in claim 3 further comprising:

means for sampling said error voltage each tachometer period, and meansfor applying the sampled error voltage directly to said motor to changethe speed thereof. 5. The system recited in claim 3 further comprising apulse generator responsive to said tachometer pulses, said puslegenerator producing pulses at a rate which is twice the frequency ofsaid acoustic signal produced by said acoustic generator, the output ofsaid pulse generator being compared to said local clock pulses toproduce said error voltage.

6. The system recited in claim 1 further comprising:

means for generating a phase lock signal representative of saidpredetermined speed of the motor,

speed changing means responsive to the occurrence of a data pulse forchanging the speed of said motor to change the phrase state of theacoustic signal,

means for generating an instantaneous signal representative of theinstantaneous speed of the motor,

a differential integrator, said phase lock and said instantaneoussignals being applied to said differential integrator to produce anintegral signal representing the integral of the difference between saidpredetermined speed and said instantaneous speed, and

means for comparing said phase lock signal with said integral signal toproduce a control signal when a specific phase shift in said motor speedhas been attained.

7. The system recited in claim 1 wherein said means for generating aprogrammed function comprises:

means for initially applying a step voltage to said motor controlcircuit, and

means for adding a linearly increasing voltage to the step voltage.

8. The system recited in claim 7 wherein said means for generating asecond programmed function comprises:

means for, upon the occurrence of said predetermined phase shift,immediately reducing the voltage applied to the motor control circuit toa lesser value, and

means for continuing the application of said voltage of lesser value fora predetermined time whereupon the acoustic signal will have attainedanother predetermined phase state.

9. In a logging-while-drilling system including an acoustic generatorfor imparting to a well liquid an acoustic signal having a constantfrequency, the method of momentarily changing the speed of said motor toeffect a change in the phase state of the signal comprising:

accelerating said motor,

measuring the change in phase of said acoustic signal caused by thechanging motor speed, and stopping said acceleration when the measuredchange of phase is a predetermined phase shift which is less than thedesired change in phase.

10. The method recited in claim 9 wherein the step of acceleratingcomprises:

initially applying a step voltage to a motor control circuit, and

adding a linearly increasing voltage to the step voltage. 11. The methodrecited in claim 10 wherein the step of stopping the acceleration uponthe occurrence of said predetermined phase shift comprises:

immediately reducing the voltage applied to the motor control circuit toa lesser value, and

continuing the application of said voltage of lesser value for apredetermined time whereupon the acoustic signal will have attainedanother predetermined phase state.

12. The method recited in claim 9 wherein the desired change in phase is180 and the predetermined change of phase is more than 90.

13. The method recited in claim 12 wherein said predetermined change inphase is approximately 90.

14. In a logging-while-drilling system for use in a wellbore filled withliquid and having an acoustic generator for imparting to the liquid anacoustic signal whose frequency is proportional to the speed of a motordriving the acoustic generator, the improvement comprising:

a motor control circuit,

means for maintaining through said motor control circuit the speed ofthe motor constant at a predetermined value and in a constantpredetermined phase relation to local clock pulses,

means responsive to the occurrence of a data pulse to disable theaforesaid means and to apply to said motor control circuit a programmedfunction to change the speed of the motor in a first direction to changethe phase state of the acoustic signal, means responsive to apredetermined change in the phase state caused by change in the speed ofsaid motor to terminate said first programmed function and to apply asecond programmed function to change the speed in a second direction,and means for enabling said maintaining means following a predeterminedphase change to again obtain said constant speed with the acousticsignal having undertaken a phase change of 180.

15. ln a logging-while-drilling system wherein the drilling mud streamis continuously interrupted to generate acoustic signals having multiplephase states representative of a measured downhole condition and whereinthe frequency of interruption is determined by the rotation of anelectrical motor, a system responsive to a measured data condition forrapidly changing the speed of the motor to in turn change the phase ofthe acoustic signal comprising:

means for initially applying a step voltage to a motor control circuit,

means for adding a linearly increasing voltage to the predeterminedphase state.

UNITED STATES PATENT OFFICE CERTIFICATE OF CORRECTION Patent No. 3 ,820,063 Dated June 25 1 974 ln n fl James H. Sexton, Bobbie J. Patton, andJohn W. Harrell It is certified that error appears in theabove-identified patent and that said Letters Patent are herebycorrected as shown below:

Column 2, lines 45 and 46, and Column 3 lines 25 and 26, "Pattonapplication" should read United States Patent No. 3,789,355", 7 Column4, line 61, Column 5, lines 47,- 49, 52, 56, and 59, and Column 6 lines20 and 24, "g (23" each occurrence, should read g Column 8, lines 25 and36, "declaration" each occurrence, should read -deceleration--.

Column 9, line 2, "Waveform 0" should read Waveform 9 Column 10, line33, "function 0" should read function o Column 11, lines 10 and ll(Claim 1) delete "of fixed time duration"; line 13 (Claim 1) after"phase" insert --state--; and line48 (Claim '6) "phrase" should read--phase--.

Signed and sealed this 29thday of October 1974.

(SEAL) Attest:

McCOY M. GIBSON JR. C. MARSHALL D ANN Arresting Officer Commissioner ofPatents FORM PO-1050 (10-69) v USCOMM-DC 60376-P69 U.S, GOVERNMENTPRINTING OFFICE: I959 O366334 UNITED STATES PATENT OFFICE CERTIFICATE OFCORRECTION Patent No. 3 ,820,063 Dated June 25, 1974 v James H. Sexton.Bobbie J. Patton, and John W. Harrell It is certified that error appearsin the above-identified patent and that said Letters Patent are herebycorrected as shown below:

Column 2, lines 45 and 46, and Column 3 lines 25 and 26, "Pattonapplication" should read United States Patent No. 3,789,355-. Column 4,line 61, Column 5, lines 47, 49, 52, 56, and 59, and Column 6 lines 20and 24, "g (25" each occurrence, should read e Column 8, lines 25 and 36"decleration" each occurrence, should read -deceleration--.

Column 9, line 2, "waveform 0" should read -waveform q- Column 10, line33 "function 0" should read function 2 Column ll, lines 10 and ll(Claim 1) delete "of fixed time duration"; line 13 (Claim 1) after"phase" insert --state--; and line48 (Claim 6) "phrase" should read--phase- Signed and sealed this 29th day of October 1974.

(SEAL) Attest:

McCOY M. GIBSON JR. C. MARSHALL DANN Attestlng Officer Commissioner ofPatents FORM PO-IOSO (10-69) USCOMM-DC 6O376-P59 U,S. GOVERNMENTPRINTING OFFICE: (969 0-356-334

1. In a logging-while-drilling system including a motor which drives anacoustic generator at a predetermined speed for imparting to well liquidan acoustic signal having phase states representative of data derivedfrom measured downhole conditions, a data encoder, the improvementcomprising: means responsive to the occurrence of a data pulse forgenerating a programmed function applied to said motor to change thespeed of the motor, means for generating a control pulse upon theoccurrence of a predetermined phase shift in the acoustic signal causedby a shift in motor speed relative to said predetermined speed toterminate the application of said first programmed function, and meansresponsive to said control pulse for generating a second programmedfunction of fixed time duration applied to said motor to again changethe speed of the motor to return it to said predetermined speed but witha shift in the phase of the acoustic signal.
 2. The system recited inclaim 1 further comprising: a motor control circuit including means formaintaining the speed of said motor constant at said predetermined speedand in a constant predetermined phase relation to local clock pulses. 3.The system recited in claim 2 wherein said motor control circuitincludes: a tachometer producing tachometer pulses representing thespeed of rotation of said motor, and means for producing an errorvoltage representing the difference in phase between said tachometerpulses and said local clock pulses.
 4. The system recited in claim 3further comprising: means for sampling said error voltage eachtachometer period, and means for applying the sampled error voltagedirectly to said motor to change the speed thereof.
 5. The systemrecited in claim 3 further comprising a pulse generator responsive tosaid tachometer pulses, said pusle generator producing pulses at a ratewhich is twice the frequency of said acoustic signal produced by saidacoustic generator, the output of said pulse generator being compared tosaid local clock pulses to produce said error voltage.
 6. The systemrecited in claim 1 further comprising: means for generating a phase Locksignal representative of said predetermined speed of the motor, speedchanging means responsive to the occurrence of a data pulse for changingthe speed of said motor to change the phrase state of the acousticsignal, means for generating an instantaneous signal representative ofthe instantaneous speed of the motor, a differential integrator, saidphase lock and said instantaneous signals being applied to saiddifferential integrator to produce an integral signal representing theintegral of the difference between said predetermined speed and saidinstantaneous speed, and means for comparing said phase lock signal withsaid integral signal to produce a control signal when a specific phaseshift in said motor speed has been attained.
 7. The system recited inclaim 1 wherein said means for generating a programmed functioncomprises: means for initially applying a step voltage to said motorcontrol circuit, and means for adding a linearly increasing voltage tothe step voltage.
 8. The system recited in claim 7 wherein said meansfor generating a second programmed function comprises: means for, uponthe occurrence of said predetermined phase shift, immediately reducingthe voltage applied to the motor control circuit to a lesser value, andmeans for continuing the application of said voltage of lesser value fora predetermined time whereupon the acoustic signal will have attainedanother predetermined phase state.
 9. In a logging-while-drilling systemincluding an acoustic generator for imparting to a well liquid anacoustic signal having a constant frequency, the method of momentarilychanging the speed of said motor to effect a change in the phase stateof the signal comprising: accelerating said motor, measuring the changein phase of said acoustic signal caused by the changing motor speed, andstopping said acceleration when the measured change of phase is apredetermined phase shift which is less than the desired change inphase.
 10. The method recited in claim 9 wherein the step ofaccelerating comprises: initially applying a step voltage to a motorcontrol circuit, and adding a linearly increasing voltage to the stepvoltage.
 11. The method recited in claim 10 wherein the step of stoppingthe acceleration upon the occurrence of said predetermined phase shiftcomprises: immediately reducing the voltage applied to the motor controlcircuit to a lesser value, and continuing the application of saidvoltage of lesser value for a predetermined time whereupon the acousticsignal will have attained another predetermined phase state.
 12. Themethod recited in claim 9 wherein the desired change in phase is 180*and the predetermined change of phase is more than 90*.
 13. The methodrecited in claim 12 wherein said predetermined change in phase isapproximately 90*.
 14. In a logging-while-drilling system for use in awellbore filled with liquid and having an acoustic generator forimparting to the liquid an acoustic signal whose frequency isproportional to the speed of a motor driving the acoustic generator, theimprovement comprising: a motor control circuit, means for maintainingthrough said motor control circuit the speed of the motor constant at apredetermined value and in a constant predetermined phase relation tolocal clock pulses, means responsive to the occurrence of a data pulseto disable the aforesaid means and to apply to said motor controlcircuit a programmed function to change the speed of the motor in afirst direction to change the phase state of the acoustic signal, meansresponsive to a predetermined change in the phase state caused by changein the speed of said motor to terminate said first programmed functionand to apply a second programmed function to change the speed in asecond direction, and means for enabling said maintaining meansfollowing a predetermined phase change to again obtain said constantspEed with the acoustic signal having undertaken a phase change of 180*.15. In a logging-while-drilling system wherein the drilling mud streamis continuously interrupted to generate acoustic signals having multiplephase states representative of a measured downhole condition and whereinthe frequency of interruption is determined by the rotation of anelectrical motor, a system responsive to a measured data condition forrapidly changing the speed of the motor to in turn change the phase ofthe acoustic signal comprising: means for initially applying a stepvoltage to a motor control circuit, means for adding a linearlyincreasing voltage to the step voltage, means for detecting the amountof phase shift in the acoustic signal caused by a shift in motor speedrelative to said predetermined speed, means for, upon the occurrence ofa predetermined phase shift, immediately reducing the voltage applied tothe motor control circuit to a lesser value, and means for continuingthe application of said voltage of lesser value for a predetermined timewhereupon the acoustic signal will have attained another predeterminedphase state.